﻿@{
    ViewBag.Title = "Thêm mới danh mục con";
    Layout = "~/Views/Shared/_Layout.Management.cshtml";
}

<form method="post" class="form" action="/Management/SubCategoryList/Add">
	<fieldset id="firstStep">
		<h2 class="app">
	        <strong>Express - Thêm mới danh mục con</strong>
        </h2>
		<div class="errorMessage" data-bind="visible: InvalidateForm" >
			<span class="error">Xin hãy nhập thông tin bên dưới chính xác.</span>
		</div>				
		<div class="title">
			<h3>Thông tin danh mục con</h3>
		</div>
		<div class="columns">
			<div class="col indent">
				<div class="row">
					<label>Tên danh mục con:</label>
					<input class="text" type="text" data-bind="value: Name, attr:{maxlength:50}" name="Name" />
                </div>     
				<div class="row">
					<label>Danh mục cha:</label>

					<div class="select-holder">
						<select data-bind='value: Category, foreach: CategoryOptions, optionsCaption: "Select Category"' name="Category">
							<option data-bind="value: ID, text: Name">Select Category</option>
						</select>
					</div>
                </div>               
				<div class="row">
					<label>Thứ tự:</label>
					<input class="text" style="width:60px" type="text" data-bind="value: SortOrder, attr:{maxlength:5}" name="SortOrder" />

                </div>               
				<div class="row">
					<label>Kích hoạt:</label>
				    <div id="editform" class="groupinput">
					    <input class="text" type="checkbox" data-bind="checked: Active" name="Active" /> 
				    </div>
                </div>
			</div>
		</div>  

        <!-- button below -->
		<div class="foot-info">
			<h3 class="centered-wbtn centered-wbtn-bottom save">
  				<span>
  					<a class="btn btn-cancel-page" href="/Management/SubCategoryList">previous</a>
					<input type="button" class="btn btn-submit-page" data-bind="click: SubmitForm" value="Submit" />
                </span>
			</h3>
		</div>
	</fieldset>
</form>
<script type="text/javascript">
    var data = @(Html.Raw(Json.Encode(Model)));
</script>
<script src="/Scripts/ViewModel/addsubcategory.js" type="text/javascript"></script>